/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package composants;

import landinggearsystem.Software;

/**
 *
 * @author Valentin
 */
public class Roue {
    
    public boolean haut;
    public boolean bas;
    int temps=5000;
    int i;
    Software s;
    
    public Roue(Software software)
    {
        s=software;
        haut=false;
        bas=true;
        s.signalerRoueBaissee();
    }
    
    public void lever()
    {
        if(bas==true)
        {
            haut=false;
            bas=false;
            s.signalerRoueMouvement();
            i=0;
            while(i<temps)
            {
                System.out.println("lever roue "+i);
                i++;
            }
            haut=true;
            s.signalerRoueLevee();
        }   
    }
    
    public void baisser()
    {
        if(haut==true)
        {
            bas=false;
            haut=false;
            s.signalerRoueMouvement();
            i=0;
            while(i<temps)
            {
                System.out.println("baisser roue "+i);
                i++;
            }
            bas=true;
            s.signalerRoueBaissee();
        }   
    }
    
}
